package com.gbei.center.oauth.model;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@Table(name = "auth_access_token")
public class AuthAccessToken {

    @Id
    private Integer id;

    /**
     * Access Token
     */
    @Column(name = "access_token")
    private String accessToken;

    /**
     * 关联的用户ID
     */
    @Column(name = "user_id")
    private String userId;
    /**
     * 关联的用户名
     */
    @Column(name = "user_name")
    private String userName;

    /**
     * 关联的用户手机号码
     */
    private String mobile;

    /**
     * 接入的客户端ID
     */
    @Column(name = "client_id")
    private String clientId;

    /**
     * 过期时间戳
     */
    @Column(name = "expires_in")
    private Long expiresIn;

    /**
     * 授权类型，比如：authorization_code
     */
    @Column(name = "grant_type")
    private String grantType;
    /**
     * 可被访问的用户的权限范围，比如：basic、super
     */
    private String scope;

    @Column(name = "create_user")
    private String createUser;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "update_user")
    private String updateUser;

    @Column(name = "update_time")
    private Date updateTime;

}